﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="box.aspx.cs" Inherits="AnyOffice.general.email.box" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>邮件箱管理</title>
		
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<script src="/aspnet_client/core/function.js"></script>
		<script Language="JavaScript">
function CheckForm()
{
   if(document.Form1.txtBoxNo.value=="")
   { alert("邮箱序号不能为空！");
	 document.Form1.txtBoxNo.focus();
     return (false);
   }
   
   if(!checkIsInteger(document.Form1.txtBoxNo.value))
  {
     alert("邮箱序号只能为整数！"); 
     document.Form1.txtBoxNo.focus();  
     return false;
  }  
   
   if(document.Form1.txtBoxName.value=="")
   { alert("邮箱名称不能为空！");
     document.Form1.txtBoxName.focus();
     return (false);
   }
   return true
}

function delete_box(box_id)
{
 msg='删除该邮箱将删除该邮箱下的所有邮件，确认要删除该邮箱么？';
 if(window.confirm(msg))
 {
  URL="box_delete.aspx?box_id=" + box_id;
  window.location=URL;
 }
}
</script>
	</HEAD>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/notify_new.gif" align="absMiddle"><span class="big3"> 
							添加邮件箱</span>
					</td>
				</tr>
			</table>
			<table border="0" cellspacing="1" width="450" class="small" cellpadding="3" align="center" bgcolor="#000000">
				<TBODY>
					<tr>
						<td nowrap class="TableData">序号：</td>
						<td nowrap class="TableData">
							<asp:TextBox id="txtBoxNo" runat="server" MaxLength="4" Columns="6" CssClass="BigInput"></asp:TextBox>
						</td>
					</tr>
					<tr>
						<td nowrap class="TableData">名称：</td>
						<td nowrap class="TableData">
							<asp:TextBox id="txtBoxName" runat="server" MaxLength="50" Columns="25" CssClass="BigInput"></asp:TextBox>
						</td>
					</tr>
					<tr>
						<td nowrap class="TableControl" colspan="2" align="center">
							<input type="submit" value="添加" class="BigButton" title="添加" name="button" onclick="return CheckForm();">
						</td>
					</tr>
				</TBODY>
			</table>
			<br>
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/notify_open.gif" align="absMiddle"><span class="big3">
							管理邮件箱</span>
					</td>
				</tr>
			</table>
			   <table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3"
						align="center">
				<tr class="TableHeader">
					<td nowrap align="center">序号</td>
					<td nowrap align="center">名称</td>
					<td nowrap align="center">占用空间</td>
					<td nowrap align="center">操作</td>
				</tr>
				<tr class="TableData">
				    <td nowrap align="center"></td>
				    <td nowrap align="center">收件箱</td>
				    <td nowrap>
                        <asp:Literal ID="litInbox" runat="server"></asp:Literal></td>
				    <td nowrap align="center"></td>
			    </tr>
			    <tr class="TableData">
				    <td nowrap align="center"></td>
				    <td nowrap align="center">发件箱</td>
				    <td nowrap>
                        <asp:Literal ID="litOutbox" runat="server"></asp:Literal></td>
				    <td nowrap align="center"></td>
			    </tr>
			    <asp:Repeater id="rptBox" runat="server">
				    <ItemTemplate>
					    <tr class="TableData">
						    <td nowrap align="center"><%#Eval("BoxNo")%></td>
						    <td nowrap align="center"><%#Eval("BoxName")%></td>
						    <td nowrap><%#FormatSize(Convert.ToInt32(Eval("BoxId").ToString()))%></td>
						    <td nowrap align="center">
						      <a href="box_edit.aspx?box_id=<%#Eval("BoxId")%>"> 编辑</a>
							    <a href="javascript:delete_box('<%#Eval("BoxId")%>');"> 删除</a>
						    </td>
					    </tr>
				    </ItemTemplate>
			    </asp:Repeater>
			    <tr class="TableContent">
                  <td nowrap align="center" colspan="2">邮箱限制容量：<asp:Literal ID="litEmailCapacity" runat="server"></asp:Literal></td>
                  <td nowrap colspan="2"><asp:Literal ID="litTotal" runat="server"></asp:Literal></td>
                </tr>
			    </table>
			    <br>
			    <asp:Literal id="litMessage" runat="server" EnableViewState="False"></asp:Literal>			
			  
		</form>
	</body>
</HTML>
